<format>
  <id company="Oracle" name="11g alert log xml" />
  <description>XML-formatted alert log written by Oracle Database 11g or later</description>
  <xml>
    <patterns>
      <pattern>log.xml</pattern>
      <pattern>*.xml</pattern>
    </patterns>
    <encoding>utf-8</encoding>	
    <head-re><![CDATA[\<msg]]></head-re>
	
	<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:lj="http://logjoint.codeplex.com/">

		<xsl:output method="xml"/>

		<xsl:template match='msg'>
      <m>
        <xsl:attribute name='d'>
          <xsl:value-of select='lj:TO_NATIVE_DATETIME_STR(lj:TO_DATETIME(@time, "yyyy-MM-ddTHH:mm:ss.fffK"))'/>
        </xsl:attribute>
        <xsl:attribute name='s'>
          <xsl:choose>
            <xsl:when test="@type='ERROR'">e</xsl:when>
            <xsl:when test="@type='WARNING'">w</xsl:when>
            <xsl:otherwise>i</xsl:otherwise>
          </xsl:choose>
        </xsl:attribute>

        <xsl:value-of select="normalize-space(txt/text())"/><xsl:value-of select="lj:NEW_LINE()"/>
        <xsl:text xml:space="preserve">  Organization ID: </xsl:text><xsl:value-of select="@org_id"/><xsl:value-of select="lj:NEW_LINE()"/>
        <xsl:text xml:space="preserve">  Component ID: </xsl:text><xsl:value-of select="@comp_id"/><xsl:value-of select="lj:NEW_LINE()"/>
        <xsl:text xml:space="preserve">  Client ID: </xsl:text><xsl:value-of select="@client_id"/><xsl:value-of select="lj:NEW_LINE()"/>
        <xsl:text xml:space="preserve">  Process ID: </xsl:text><xsl:value-of select="@pid"/><xsl:value-of select="lj:NEW_LINE()"/>
        <xsl:text xml:space="preserve">  Type: </xsl:text><xsl:value-of select="@type"/><xsl:value-of select="lj:NEW_LINE()"/>
        <xsl:text xml:space="preserve">  Host ID: </xsl:text><xsl:value-of select="@host_id"/><xsl:value-of select="lj:NEW_LINE()"/>
        <xsl:text xml:space="preserve">  Host addr: </xsl:text><xsl:value-of select="@host_addr"/><xsl:value-of select="lj:NEW_LINE()"/>
        <xsl:text xml:space="preserve">  Module: </xsl:text><xsl:value-of select="@module"/><xsl:value-of select="lj:NEW_LINE()"/>
      </m>
		</xsl:template>
	</xsl:stylesheet>

	<dejitter jitter-buffer-size="48"/>

	</xml>

  <view-options>
    <preferred-view>normal</preferred-view>
    <raw-view-allowed>yes</raw-view-allowed>
  </view-options>
</format>